﻿do
	IGAS:NewAddon("IGAS_Studio")

	local _DB

	------------------------------------------------------------
	-- ScriptType
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Model, "ScriptType")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "ScriptType"))

	------------------------------------------------------------
	-- Function
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Model, "Function")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Function"))

	_DB:AddCodeHelp("SetFogFar", [=[Sets the far clipping distance for the model's fog.]=], [=[SetFogFar(distance)]=])
	_DB:AddCodeHelp("GetModel", [=[Returns the model file currently displayed]=], [=[GetModel()]=])
	_DB:AddCodeHelp("SetFogNear", [=[Sets the near clipping distance for the model's fog.]=], [=[SetFogNear(distance)]=])
	_DB:AddCodeHelp("SetModelScale", [=[Sets the scale factor determining the size at which the 3D model appears]=], [=[SetModelScale(scale)]=])
	_DB:AddCodeHelp("SetFogColor", [=[Sets the model's fog color, enabling fog display if disabled]=], [=[SetFogColor(red, green, blue)]=])
	_DB:AddCodeHelp("AdvanceTime", [=[Advances to the model's next animation frame]=], [=[AdvanceTime()]=])
	_DB:AddCodeHelp("GetModelScale", [=[Returns the scale factor determining the size at which the 3D model appears]=], [=[GetModelScale()]=])
	_DB:AddCodeHelp("GetFacing", [=[Returns the model's current rotation setting]=], [=[GetFacing()]=])
	_DB:AddCodeHelp("SetSequenceTime", [=[Sets the animation sequence and time index to be used by the model]=], [=[SetSequenceTime(sequence, time)]=])
	_DB:AddCodeHelp("GetFogNear", [=[Returns the near clipping distance for the model's fog.]=], [=[GetFogNear()]=])
	_DB:AddCodeHelp("ClearFog", [=[Disables fog display for the model.]=], [=[ClearFog()]=])
	_DB:AddCodeHelp("SetCamera", [=[Sets the view angle on the model to a pre-defined camera location]=], [=[SetCamera(index)]=])
	_DB:AddCodeHelp("GetFogFar", [=[Returns the far clipping distance for the model's fog.]=], [=[GetFogFar()]=])
	_DB:AddCodeHelp("ClearModel", [=[Removes the 3D model currently displayed]=], [=[ClearModel()]=])
	_DB:AddCodeHelp("SetModel", [=[Sets the model file to be displayed]=], [=[SetModel("filename")]=])
	_DB:AddCodeHelp("SetSequence", [=[Sets the animation sequence to be used by the model]=], [=[SetSequence(sequence)]=])
	_DB:AddCodeHelp("SetPosition", [=[Returns the position of the 3D model within the frame]=], [=[SetPosition(x, y, z)]=])
	_DB:AddCodeHelp("GetFogColor", [=[Returns the model's current fog color]=], [=[GetFogColor()]=])
	_DB:AddCodeHelp("SetLight", [=[Sets properties of the light sources used when rendering the model]=], [=[SetLight(enabled, omni, dirX, dirY, dirZ, ambIntensity [, ambR [, ambG [, ambB [, dirIntensity [, dirR [, dirG [, dirB]]]]]]])]=])
	_DB:AddCodeHelp("GetLight", [=[Returns properties of the light sources used when rendering the model]=], [=[GetLight()]=])
	_DB:AddCodeHelp("GetPosition", [=[Returns the position of the 3D model within the frame]=], [=[GetPosition()]=])
	_DB:AddCodeHelp("SetGlow", [=[Sets the model's glow amount]=], [=[SetGlow(amount)]=])
	_DB:AddCodeHelp("SetFacing", [=[Sets the model's current rotation]=], [=[SetFacing(facing)]=])
	_DB:AddCodeHelp("ReplaceIconTexture", [=[Sets the icon texture used by the model]=], [=[ReplaceIconTexture("filename")]=])
	------------------------------------------------------------
	-- Property
	------------------------------------------------------------
	_DB = CreateHelpDB(IGAS.GUI.Widget.Model, "Property")
	_DB:SetBaseHelpDB(CreateHelpDB(IGAS.GUI.Widget.Frame, "Property"))

	_DB:AddCodeHelp("FogFar", [[the far clipping distance for the model's fog]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("FogColor", [[the model's current fog color]], IGAS:GetPropertyType("Color"))
	_DB:AddCodeHelp("Model", [[the model file to be displayed]], IGAS:GetPropertyType("string"))
	_DB:AddCodeHelp("FogNear", [[the near clipping distance for the model's fog]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Position", [[the position of the 3D model within the frame]], IGAS:GetPropertyType("Position"))
	_DB:AddCodeHelp("ModelScale", [[the scale factor determining the size at which the 3D model appears]], IGAS:GetPropertyType("number"))
	_DB:AddCodeHelp("Light", [[properties of the light sources used when rendering the model]], IGAS:GetPropertyType("Light"))
end
